<?php	
//date
//给学生表添加生日字段(1990-10-10)
alter table stu add birthday date; 
//添加数据
insert into stu (name,age,cid,birthday) values ("王国宝",20,3,"19901010");
insert into stu (name,age,cid,birthday) values ("宋慈",20,3,"1990-11-10");

//获取当前时间
select now() as n;
+---------------------+
| n                   |
+---------------------+
| 2016-08-24 09:47:45 |
+---------------------+
1 row in set (0.00 sec)

//获得当前年份
select year(now());

















